﻿using MaterialDemo.Model.UserDTO;
using System;
using System.Collections.Generic;
using System.Text;

namespace MaterialDemo.IService.IPermission
{
    public interface IUserService
    {
        /// <summary>
        /// 添加管理员信息
        /// </summary>
        /// <param name="inputEntity"></param>
        /// <returns></returns>
        int Add(UserInput inputEntity);

        /// <summary>
        /// 修改管理员信息
        /// </summary>
        /// <param name="inputEntity"></param>
        /// <returns></returns>
        int Update(UserInput inputEntity);

        /// <summary>
        /// 删除员工信息
        /// </summary>
        /// <param name="inputEntity"></param>
        /// <returns></returns>
        bool Delete(int id);

        /// <summary>
        /// 根据Id查询管理员信息
        /// </summary>
        /// <returns></returns>
        List<UserOutput> LoadEntities(int id);

        /// <summary>
        /// 分页查询管理员信息
        /// </summary>
        /// <returns></returns>
        List<UserOutput> LoadPagesEntities(int pageIndex, int pageSize, out int count, string selectInfo);

        /// <summary>
        /// 判断用户是否存在，存在返回true
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        bool CheckRepeat(string value);


        /// <summary>
        /// 禁用或开启用户
        /// </summary>
        /// <param name="id"></param>
        /// <param name="flag"></param>
        /// <returns></returns>
        bool ForbidUser(int id, string flag);


        /// <summary>
        /// 根据id重置密码
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool RePwd(int id);
    }
}
